<!DOCTYPE html>
<html>
  <head>
    <title>projectModularList.html</title>
	
    <meta name="keywords" content="keyword1,keyword2,keyword3">
    <meta name="description" content="this is my page">
    <meta name="content-type" content="text/html; charset=UTF-8">
	<script type="text/javascript" src="../js/jquery-2.1.4.js"></script>
	<script type="text/javascript" src="../js/tool.js"></script>
	<script type="text/javascript">
		$(function() {
			$.ajax({
				type : 'POST',
				url : "getProjectModular.do",
				data : {
					projectId:getQueryString("projectId"),
					modularId:getQueryString("modularId"),
					page:1,
					size:20,
					sort:""
				},
				dataType : "JSON",
				success : function(data){
					var projectList=data["data"];
					$(projectList).each(function(i,o){
						var tr=$("<tr>");
						tr.attr("id",o["MODULAR_ID"]);
						tr.append($("<td>").text(o["MODULAR_NAME"]));
						tr.append($("<td>").text(o["MODULAR_STATE"]));
						tr.append($("<td>").text(o["PARENT_MODULAR_NAME"]));
						tr.append($("<td>").text(o["PROJECT_NAME"]));
						tr.append($("<td>").text(o["INTERFACE_NUMBER"]));
						tr.append($("<td>").text(o["CASE_NUMBER"]));
						tr.append($("<td>").text(o["SUCCESS_INTERFACE"]));
						tr.append($("<td>").text(o["SUCCESS_CASE"]));
						tr.append($("<td>").text(o["INTERFACE_NUMBER"]-o["SUCCESS_INTERFACE"]));
						tr.append($("<td>").text(o["CASE_NUMBER"]-o["SUCCESS_CASE"]));
						var options="";
						options+="<button type=\"button\">修改</button>  ";
						options+="<button type=\"button\" onclick=\"javascript:window.location.href='../modular/projectModularList.html?projectId="+o["PROJECT_ID"]+"&modularId="+o["MODULAR_ID"]+"'\">查看子模块</button>";
						options+="<button type=\"button\" onclick=\"javascript:window.location.href='../interface/getModularInterface.do?modularId="+o["MODULAR_ID"]+"'\">查看接口</button>";
						tr.append($("<td>").html(options));
						$("#projectList").append(tr);
					});
				}
			});
		});
	</script>
  </head>
  
  <body>
	  <table border="8" style="width: 80%">
			<thead>
				<tr>
					<td>模块名称</td>
					<td>模块状态</td>
					<td>模块所属模块</td>
					<td>模块所属项目</td>
					<td>接口数量</td>
					<td>案例数量</td>
					<td>已成功接口数量</td>
					<td>已成功案例数量</td>
					<td>待联调接口数量</td>
					<td>待联调案例数量</td>
					<td>操作</td>
				</tr>
			</thead>
			<tbody id="projectList">
			
			</tbody>
		</table>
  </body>
</html>
